home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / nxyplot / Source / Plot.h < prev    next >
Text File  |  1994-02-01  |  7KB  |  229 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import <objc/Object.h>
  5. #import <appkit/nextstd.h>    /* gets stdio */
  6. #import <appkit/Form.h>        /* for NXCoord, etc. */
  7. #import <appkit/color.h>
  8. #import "ScrollWindow.h"        // added 10-7-91 by pdhowell
  9.  
  10. typedef struct _datahunk {
  11.     char  *filename;
  12.     float *x;
  13.     float *ex;            /* for error bars */
  14.     float **y;
  15.     float **ey;            /* for error bars */
  16.     int   npoints;
  17.     int   ncurves;
  18.     NXPoint datamin;
  19.     NXPoint datamax;
  20.     BOOL    xaxislin;
  21.     BOOL    yaxislin;
  22.     BOOL    has_exbars;        /* for error bars */
  23.     BOOL    has_eybars;        /* for error bars */
  24. } datahunk;
  25.  
  26. @interface Plot:Object
  27. {
  28.     id  datahunkArray;        /* array of datahunk structs (a Storage object) */
  29.     id  xLimits;        /* for xmin, xmax, xinc */
  30.     id    yLimits;        /* for ymin, ymax, yinc */
  31.     id    canvas;            /* the PlotView object */
  32.     id  lineText;        /* the lineText object */
  33.     id  symbolText;        /* the symbolText object */
  34.     id  lineMatrix;        /* the lineMatrix object */
  35.     id  symbolMatrix;        /* the symbolMatrix object */
  36.     id  plotButton;        /* the plot Button object */
  37.     id  xLinLog;        /* the x-axis linear/logarithmic button */
  38.     id  yLinLog;        /* the y-axis linear/logarithmic button */
  39.     id  legendForm;        /* for the curve titles on the legend */
  40.     id  changeLegendFont;    /* the change legend font on/off button */
  41.     id  changeLegendTitleFont;    /* the change leg. title font on/off button */
  42.     id  changeXTitleFont;    /* the change x title font on/off button */
  43.     id  changeYTitleFont;    /* the change y title font on/off button */
  44.     id  changeMainTitleFont;    /* the change main title font on/off button */
  45.     id  changeTicLabelFont;    /* the change tic label font on/off button */
  46.     id  curveNumber;        /* the TextField on the color panel */
  47.     id  curveColorWell;        /* color well for the curves */
  48.     id  backgroundColorWell;    /* color well for background */
  49.     id  textColorWell;        /* color well for text */
  50.     id  columnPanel;        /* the Column Selection panel */
  51.     id  columnSelectionHandler;    /* manages the Column Selection panel */
  52.     id  accPrintColorButton;    /* print color button on accessories panel */
  53.     id  accPrintLineStyleButton;/* line style button on accessories panel */
  54.     id  printPreview;        /* are we previewing before printing? */
  55.     id  binaryOpenAccessory;    /* accessory view for binary open */
  56.     id  binaryOpenForm;        /* how many curves in the binary file */
  57.     id  binaryXdatathere;    /* is there X data in the binary file? */
  58.     id  writeDataAccButton;    /* should we write ascii or binary? */
  59.     id  errorBars;        /* the error bars pop-up list*/
  60.     id  errorBarPanel;        /* the panel with information about error bars */
  61.     id  errorBarHandler;    /* manages the error bar panel */
  62.     id  fileRemovalPanel;    /* for selective file removal */
  63.     id  fileRemovalMatrix;         /* filenames in file removal window */
  64.     id  fileRemovalButtons;    /* buttons for clicking on filenames */
  65.     id  autoPlotButton;        /* button on the Preference panel */
  66.  
  67.     int ncurvestotal;        /* total number of curves  */
  68.     int nfilestotal;        /* total no. of files "open" */
  69.  
  70.     NXPoint globaldatamin;    /* xmin and ymin from the data */
  71.     NXPoint globaldatamax;    /* xmax and ymax from the data */
  72.  
  73.     NXPoint oldMin;        /* for use by "previous view" */
  74.     NXPoint oldMax;        /* ditto */
  75.     NXPoint oldInc;        /* ditto */
  76.     NXPoint currentMin;        /* ditto */
  77.     NXPoint currentMax;        /* ditto */
  78.     NXPoint currentInc;        /* ditto */
  79.  
  80.     int beepError;
  81.  
  82.     NXColor backgroundcolor, textcolor;
  83.     NXColor *curvecolors;
  84.     BOOL colorOption;
  85.  
  86. // these lines added by pdhowell
  87.     id  lineMatrixWindow;         /* the lineMatrix object's Window */
  88.     id  symbolMatrixWindow;       /* the symbolMatrix object's Window */
  89.     id  legendFormWindow;         /* the legendForm object's Window */
  90. }
  91.  
  92. /* class methods */
  93. + initialize;
  94.  
  95. /* instance methods */
  96. - init;
  97. - makeSomeScrollWindows;     // added by pdhowell
  98.  
  99. - (NXCoord *)xdata:(int)n;
  100. - (NXCoord *)exdata:(int)n;
  101. - (NXCoord **)ydata:(int)n;
  102. - (NXCoord **)eydata:(int)n;
  103. - (BOOL)has_exbars:(int)n;
  104. - (BOOL)has_eybars:(int)n;
  105.  
  106. - (int) nPoints:(int)n;
  107. - (int) nCurves:(int)n;
  108. - (char *) filename:(unsigned)n;
  109. - (int) nCurvesTotal;
  110. - (int) nFiles;
  111.  
  112. - makeLineStyle:(int)aCurve :(int)lineStyle;
  113. - makeSymbolType:(int)aCurve :(int)symType;
  114.  
  115. - (BOOL) xaxisLog;
  116. - (BOOL) yaxisLog;
  117. - forceXaxisLinear;
  118. - forceYaxisLinear;
  119. - forceXaxisLog;
  120. - forceYaxisLog;
  121. - (BOOL) shouldChangeLegendFont;
  122. - (BOOL) shouldChangeLegendTitleFont;
  123. - (BOOL) shouldChangeXTitleFont;
  124. - (BOOL) shouldChangeYTitleFont;
  125. - (BOOL) shouldChangeMainTitleFont;
  126. - (BOOL) shouldChangeTicLabelFont;
  127.  
  128. - (int)providelinestyle: (int)aCurve;
  129.                 /* 0=solid, 1=dash, 2=dot, 3=chain dash */
  130.                 /* 4=chain dot, 5=none : see defs.h */
  131. - (int)providesymbolstyle: (int)aCurve;
  132.                 /* 0=none, 1=circle, 2=x, 3=up triangle */
  133.                 /* 4=down triangle, 5=diamond, 6=square  */
  134.                 /* 7=plus : see defs.h */
  135.  
  136. - (double)provideXmin;
  137. - (double)provideXmax;
  138. - (double)provideXinc;
  139. - (double)provideYmin;
  140. - (double)provideYmax;
  141. - (double)provideYinc;
  142.  
  143. - (float)provideGlobalXmin;
  144. - (float)provideGlobalYmin;
  145.  
  146. - resetXmin:(double)x;
  147. - resetXmax:(double)x;
  148. - resetXinc:(double)x;
  149. - resetYmin:(double)x;
  150. - resetYmax:(double)x;
  151. - resetYinc:(double)x;
  152.  
  153. - resetMinMax:sender;
  154.  
  155. - drawPlotButton:(int)state;
  156.  
  157. - drawPlot:sender;
  158.  
  159. - (int) readData:(NXStream *)aDataStream  :(char *)fname;
  160.  
  161. - checkLinLog:(datahunk *)pdh;
  162. - checkGlobalLinLog;
  163.  
  164. - findMinMax:(datahunk *)pdh;
  165. - findGlobalMinMax;
  166. - niceMinMaxInc;
  167.  
  168. - adjustLineStyleMatrix:(int)column :(int)row;
  169. - adjustSymbolTypeMatrix:(int)column :(int)row;
  170. - redisplayLineStyleMatrix;
  171. - redisplaySymbolTypeMatrix;
  172. - adjustPanels:(int)oldn :(int)newn;
  173. - adjustScrollWindows;
  174.  
  175. - open:sender;
  176.  
  177. - openFile:(char *)dataFile :(char *)realName;
  178.  
  179. - handleCompressedFile:(char *)fname;
  180.  
  181. - plotPrepAndDraw;
  182.  
  183. - removeAllFiles:sender;
  184.  
  185. - fixFileRemovalPanel:sender;
  186.  
  187. - removeSomeFiles:sender;
  188.  
  189. - removeAndOpen:sender;
  190.  
  191. - sanityCheck;
  192.  
  193. - writeDataFiles:sender;
  194.  
  195. - (NXColor) provideBackgroundColor;
  196. - (NXColor) provideTextColor;
  197. - (NXColor) provideCurveColor:(int)aCurve;
  198.  
  199. - setBackgroundColor:sender;
  200. - setTextColor:sender;
  201. - setCurveColor:sender;
  202. - forceBackgroundColor:(NXColor)aColor;
  203. - forceTextColor:(NXColor)aColor;
  204. - forceCurveColor:(int)curvenum :(NXColor)aColor;
  205. - makeCurvesColorful:(datahunk *)pdh;
  206.  
  207. - colorOn:(BOOL)onOff;
  208.  
  209. - fixMatrixColumn:sender;
  210.  
  211. - swapColumns:(int)prev_col :(int)col forFileNumber:(int)i;
  212.  
  213. - stackOldMinMax:(float)xmin :(float)xmax :(float)ymin :(float)ymax;
  214.  
  215. - openBinary:sender;
  216.  
  217. - openBinaryFile:(char *)dataFile;
  218.  
  219. - (int) readBinaryData:(NXStream *)aDataStream :(char *)fname :(int)numcurves
  220.                       :(int)numpoints :(BOOL)xdatathere;
  221.  
  222. - preludeToReading:(char *)fname :(datahunk **)pdh;
  223.  
  224. - postludeToReading:(char *)fname :(int)oldncurves :(datahunk *)pdh;
  225.  
  226. - previousView:sender;
  227.  
  228. @end
  229.